<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no" media="(device-height: 568px)">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="HandheldFriendly" content="True">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title></title>
    <link rel="stylesheet" type="text/css" media="all" href="../css/reset.css" />
    <link rel="stylesheet" type="text/css" media="all" href="../css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" media="all" href="../css/style.css" />

    <script type="text/javascript" src="../js/common/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="../js/common/jquery.SuperSlide.2.1.1.js"></script>
    <script src="../js/common/js.js" type="text/javascript"></script>
    <style type="text/css">
        .ringadtext {
            border: none;
            text-align: right;
            outline: none;
        }

        .mh88 {
            min-height: .88rem;
        }

        .showD {
            display: none;
            /* display: flex; */
            justify-content: flex-end;
            flex-flow: wrap;
            flex: 1;
            margin-left: 1rem;
            padding: .1rem 0;
        }
    </style>
</head>

<body>
    <!-- 顶部 -->
    <div class="header">
        <a href="fox://setBack" class="hele"></a>
        <h1 class="hetitle">个人信息</h1>
        <button class="helr saveBtn" style="border:none;background:none;padding:0px;">保存</button>
    </div>
    <!-- 搜索结果内容 -->
    <div id="page" class="page m2">
        <div class="perLists">
            <form method="post" class="perList h88 pede headForm">头像
                <img class="headRight_img" src="../img/user.jpg" alt="头像" id="headImg">
                <input type="file" name="file" class="headRight_input" id="fileInput" onchange="showPic(this)" />
            </form>
            <div class="perList h88 marT1">
                店铺名称
                <input class="per_input nick_name" type="text" value="中国石材中心" />
            </div>
            <div class="perList mh88 marT20">
                联系方式
                <input class="per_input phone" type="number" value="" />
                <div class="showD phone1"></div>
            </div>
            <a href="javascript:dialog('#d2');" class="perList h88 marT20 pede cityList">
                所在地区
                <input class="ringadtext" id="ringadtext2" placeholder="请选择" readonly />
            </a>
            <div class="perList mh88 marT1">
                详细地址
                <input class="per_input address" type="text" placeholder="请填写" />
                <div class="showD arealist"></div>
            </div>
            <div class="perList mh88 marT20">
                主营产品
                <input class="per_input main_business" type="text" placeholder="请填写" />
                <div class="showD main_business1"></div>
            </div>
            <textarea class="per_textarea marT20 description" placeholder="请填写公司简介"></textarea>
        </div>

        <!-- 遮罩 -->
        <div class="mask" onclick="dialogClose();"></div>
        <!--省份弹窗-->
        <div class="dialog" id="d2" style="height:inherit;top:auto;bottom:0;">
            <div class="cityLists"></div>
        </div>

        <input type="hidden" class="province">
        <input type="hidden" class="city">
        <input type="hidden" class="county">
    </div>

    <script type="text/javascript">
        // 上传头像
        //点击显示图片
        function showPic(data) {
            let formData = new FormData($(".headForm")[0]);
            formData.append("method", 'Uploads|upload_img');
            formData.append("type", 1);
            $.ajax({
                url: url,
                type: 'POST',
                data: formData,
                async: false,
                cache: false,
                contentType: false,
                processData: false,
                dataType: "json",
                success: function(res) {
                    if (res.status == 1) {
                        let data = res.data;
                        $('#headImg').attr('src', data.thumb);
                    } else {
                        alert(res.message);
                    }
                }
            })
        }
    </script>
    <script src="../js/personal_details.js" type="text/javascript"></script>
</body>

</html>